Re: [GENERAL] equivalent of sqlload? - Mailing list pgsql-general

From Herouth Maoz
Subject Re: [GENERAL] equivalent of sqlload?
Date
Msg-id l03110702b286cd256570@[147.233.159.109]
Whole thread Raw
In response to Re: [GENERAL] equivalent of sqlload?  ("Michael A. Koerber" <mak@ll.mit.edu>)
Responses Re: [GENERAL] equivalent of sqlload?  (Anton de Wet <adw@obsidian.co.za>)
List pgsql-general
At 21:01 +0200 on 25/11/98, Michael A. Koerber wrote:


>
> Now...I have broken the "copy" process down into smaller chunks and make
> multiple calls to "copy".  I have a total of about 5.4 million records and
> the job isn't done yet...my Pentium 433 has been working on this copy for
> over 24 hours.

Try putting all the separate COPYs in one transaction.

BEGIN TRANSACTION;
COPY...
COPY...
COPY...
END;

Without the surrounding transaction, each copy is a transaction and
requires transaction overhead. I don't know how much time this will save,
though. Are you sure you dropped all the indices? When you declare a
primary key it declares a unique index, so watch out for that as well.

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma



pgsql-general by date:

Previous
From: Ulf Mehlig
Date:
Subject: Re: [GENERAL] PostgreSQL and WWW
Next
From: Herouth Maoz
Date:
Subject: Re: [GENERAL] Typecasting datetype as date. How do I cope with NULLs?